#导包
import unittest
import utils
from api.login import LoginAPI
from parameterized import parameterized

class TestLoginAPI(unittest.TestCase):
    def setUp(self) -> None:
        self.login_api = LoginAPI()

    def tearDown(self) -> None:
        pass

    @parameterized.expand(utils.read_json_file())
    def test_login(self,login_data,status_code,success,code,message):
        response = self.login_api.login(login_data)

        utils.common_assert(self,response,status_code,success,code,message)